<?php
namespace app\common\validate;

/**
 * SupplierValidate
 */
class SupplierValidate extends BaseValidate
{
	protected $rule = [
	    'supplier_id' => 'require',
        'supplier_ids' => 'require|isArray',
        'action' => 'require',
        'bind' => 'require|number'
    ];
    
    protected $message = [
        'supplier_id' => '供应商ID必填',
        'supplier_ids' => 'supplier_id的集合必须为数组，并且数组不为空',
        'action' => 'action必填',
        'bind' => 'bing非法'
		//'account'  => '账号是必须的且不能为空.',
		//'password' => '密码是必须的且不能为空.'
    ];

    protected $scene = [
        'lists' => ['action'],
        'detail' => ['supplier_id'],
        'bind' => ['supplier_id','bind'],
        'async' => ['supplier_ids'],
    ];
}